
local Load = require(script:WaitForChild("Yueliang"))
local Unpack = require(script:WaitForChild("FiOne"))
getfenv().script = nil

return function(asseId, key)
	local data
	local key = key or getfenv(2)
	local name = (key.script and key.script:GetFullName())
	local ran, failureReason = pcall(function()
		local assetInfo = Load(asseId, name)
		data = Unpack(assetInfo, key)
	end)
	
	if ran then
		return setfenv(data, key)
	end
	return nil, failureReason
end